Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented May 8, 2025

Fix unparsing of empty t-strings, and use the string value in unparsing interpolations.

Copy link
Member

@lysnikolaou lysnikolaou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @JelleZijlstra! Let's backport this to 3.14 as well.

@lysnikolaou lysnikolaou added the needs backport to 3.14 bugs and security fixes label May 8, 2025
@JelleZijlstra JelleZijlstra merged commit bfac7d2 into python:main May 8, 2025
45 checks passed
@miss-islington-app
Copy link

Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 8, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 8, 2025

GH-133666 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 8, 2025
@JelleZijlstra JelleZijlstra deleted the tstr-round branch May 8, 2025 13:36
JelleZijlstra added a commit that referenced this pull request May 8, 2025
…3666)

gh-133581: Improve AST unparsing of t-strings (GH-133635)
(cherry picked from commit bfac7d2)

Co-authored-by: Jelle Zijlstra <[email protected]>
@nascheme
Copy link
Member

nascheme commented May 9, 2025

Looks like some refleak buildbots started failing after this.

https://buildbot.python.org/#/builders/1735/builds/6

test.test_future_stmt.test_future leaked [28, 28, 28] references, sum=84
test.test_future_stmt.test_future leaked [84, 84, 84] memory blocks, sum=252
Re-running test.test_future_stmt.test_future in verbose mode
test.test_future_stmt.test_future leaked [28, 28, 28] references, sum=84
test.test_future_stmt.test_future leaked [84, 84, 84] memory blocks, sum=252

@nascheme
Copy link
Member

nascheme commented May 9, 2025

Yup, it bisects to this commit on the 3.14 branch:

commit 153496921a05e205d4c45c4a64888ccd43148897 (HEAD)
Author: Miss Islington (bot) <[email protected]>
Date:   Thu May 8 15:40:44 2025 +0200

    [3.14] gh-133581: Improve AST unparsing of t-strings (GH-133635) (#133666 

@JelleZijlstra
Copy link
Member Author

Thanks for flagging, I'll investigate. Must be one of the changes in ast_unparse.c but from staring at the code I don't see anything wrong yet.

@JelleZijlstra
Copy link
Member Author

Fix in #133724. The issue was in the existing code, it just wasn't tested before.

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants